<html>
<head><meta charset="utf-8"><title>rustup cannot find rustfmt on nightly · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustup.20cannot.20find.20rustfmt.20on.20nightly.html">rustup cannot find rustfmt on nightly</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="235589397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustup%20cannot%20find%20rustfmt%20on%20nightly/near/235589397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustup.20cannot.20find.20rustfmt.20on.20nightly.html#235589397">(Apr 21 2021 at 22:01)</a>:</h4>
<p>Am I just being dumb, or is this an issue?</p>
<div class="codehilite" data-code-language="Bash"><pre><span></span><code>$ rustup toolchain install nightly-2021-03-31
info: syncing channel updates <span class="k">for</span> <span class="s1">'nightly-2021-03-31-x86_64-unknown-linux-gnu'</span>
info: latest update on <span class="m">2021</span>-03-31, rust version <span class="m">1</span>.53.0-nightly <span class="o">(</span>74874a690 <span class="m">2021</span>-03-30<span class="o">)</span>
error: component <span class="s1">'rustfmt'</span> <span class="k">for</span> target <span class="s1">'x86_64-unknown-linux-gnu'</span> is unavailable <span class="k">for</span> download <span class="k">for</span> channel nightly-2021-03-31
Sometimes not all components are available <span class="k">in</span> any given nightly. If you don<span class="err">'</span>t need the component, you can remove it with:

    rustup component remove --toolchain nightly-2021-03-31 --target x86_64-unknown-linux-gnu rustfmt
</code></pre></div>



<a name="235589527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustup%20cannot%20find%20rustfmt%20on%20nightly/near/235589527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustup.20cannot.20find.20rustfmt.20on.20nightly.html#235589527">(Apr 21 2021 at 22:02)</a>:</h4>
<p>I cannot install the toolchain at all due to this.</p>



<a name="235589775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustup%20cannot%20find%20rustfmt%20on%20nightly/near/235589775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustup.20cannot.20find.20rustfmt.20on.20nightly.html#235589775">(Apr 21 2021 at 22:04)</a>:</h4>
<p><span class="user-mention" data-user-id="256313">@Hameer Abbasi</span> Not all components are available on every nightly.  For example, if rustfmt fails to build, it won't be included.</p>



<a name="235589790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustup%20cannot%20find%20rustfmt%20on%20nightly/near/235589790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustup.20cannot.20find.20rustfmt.20on.20nightly.html#235589790">(Apr 21 2021 at 22:05)</a>:</h4>
<p>There are a few options to work around that:</p>



<a name="235589829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustup%20cannot%20find%20rustfmt%20on%20nightly/near/235589829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustup.20cannot.20find.20rustfmt.20on.20nightly.html#235589829">(Apr 21 2021 at 22:05)</a>:</h4>
<p>Use the <code>--force</code> option to force install.</p>



<a name="235589855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustup%20cannot%20find%20rustfmt%20on%20nightly/near/235589855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustup.20cannot.20find.20rustfmt.20on.20nightly.html#235589855">(Apr 21 2021 at 22:05)</a>:</h4>
<p>Use the <code>--profile=minimal</code> to only install the minimal set of components.</p>



<a name="235589981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/rustup%20cannot%20find%20rustfmt%20on%20nightly/near/235589981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/rustup.20cannot.20find.20rustfmt.20on.20nightly.html#235589981">(Apr 21 2021 at 22:06)</a>:</h4>
<p>I don't remember if this works with a dated nightly, but you can also try <code>--allow-downgrade</code> so that it walks backwards to find a nightly that includes rustfmt.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>